<!doctype html>
<html>

<head>
    <meta charset="utf-8">
</head>

<body>
<script type="text/javascript">
    var jquery = 'jquery1.11.1.js';
    console.log('后缀是：' + jquery.slice(jquery.lastIndexOf('.')));
    console.log('版本号：' + jquery.slice(jquery.indexOf(1), jquery.lastIndexOf(1) + 1));
</script>
</body>

</html>